package com.cookor.poi.modules.phy.service;

import com.cookor.poi.common.persistence.DataEntity;
import com.cookor.poi.common.persistence.Page;
import com.cookor.poi.common.service.CrudService;
import com.cookor.poi.modules.phy.dao.TBookNoDao;
import com.cookor.poi.modules.phy.entity.TBookNo;
import com.cookor.poi.modules.phy.entity.TOrder;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true)
public class TBookNoService extends CrudService<TBookNoDao, TBookNo> {
  public TBookNo get(String id) {
    return (TBookNo)super.get(id);
  }
  
  public List<TBookNo> findList(TBookNo tBookNo) {
    return super.findList( tBookNo);
  }
  
  public Page<TBookNo> findPage(Page<TBookNo> page, TBookNo tBookNo) {
    return super.findPage(page,  tBookNo);
  }
  
  @Transactional(readOnly = false)
  public void save(TBookNo tBookNo) {
    super.save( tBookNo);
  }
  
  @Transactional(readOnly = false)
  public void delete(TBookNo tBookNo) {
    super.delete( tBookNo);
  }
  
  @Transactional(readOnly = false)
  public void deleteByParam(Integer tenantId, Integer actionId, Integer doctorId, Integer year, Integer month, Integer day) {
    ((TBookNoDao)this.dao).deleteByParam(tenantId, actionId, doctorId, year, month, day);
  }
  
  @Transactional(readOnly = false)
  public void batchInsert(List<TBookNo> bookNoList) {
    ((TBookNoDao)this.dao).batchInsert(bookNoList);
  }
  
  public List<TBookNo> queryByAppoint(Integer tenantId, Integer actionId, Integer doctorId, Integer year, Integer month, Integer day, Integer type, Integer status) {
    return ((TBookNoDao)this.dao).queryByAppoint(tenantId, actionId, doctorId, year, month, day, type, status);
  }
  
  @Transactional(readOnly = false)
  public void updateStatusByOrderList(List<TOrder> orderList, int status) {
    ((TBookNoDao)this.dao).updateStatusByOrderList(orderList, status);
  }
}
